home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / pdc / libr / dolib.h next >
Encoding:
C/C++ Source or Header  |  1990-04-19  |  1.8 KB  |  69 lines

  1.  
  2. #include <stdio.h>
  3.  
  4. #define TRUE  1
  5. #define FALSE 0
  6.  
  7. /* Hunk number definitions */
  8.  
  9. #define HunkNone 0      /* Not in a hunk */
  10. #define HunkUnit 999
  11. #define HunkName 1000
  12. #define HunkCode 1001
  13. #define HunkData 1002
  14. #define HunkBSS  1003
  15. #define HunkR32  1004
  16. #define HunkR16  1005
  17. #define HunkR8   1006
  18. #define HunkExt  1007
  19. #define HunkSym  1008
  20. #define HunkDbg  1009
  21. #define HunkEnd  1010
  22.  
  23. #define MEMF_FAST 0x80000000L   /* Hunk must load in FAST memory */
  24. #define MEMF_CHIP 0x40000000L   /* Hunk must load in CHIP memory */
  25.  
  26. /* Hunk numbers denoting special symbol attributes */
  27.  
  28. #define ABSHUNK 32767       /* Absolute */
  29.  
  30. #define LD  struct libdir_def
  31. #define LL  struct liblist_def
  32. #define SM  struct symbol_entry
  33. #define SP  struct symbol_pointer
  34.  
  35. struct symbol_entry {
  36.     char           *name;
  37.     LL             *parent;
  38.     SM             *next;
  39. };
  40.  
  41. struct symbol_pointer {
  42.     SM             *entry;
  43.     SP             *next;
  44. };
  45.  
  46. /*
  47.  * The following structure defines the records in the .dir file for the
  48.  * library.
  49.  */
  50.  
  51. struct libdir_def {
  52.     char            object_filename[80];    /* name of .o file               */
  53.     long            module_offset;          /* offset of module in .lib file */
  54.     long            module_size;            /* size of module in bytes       */
  55. };
  56.  
  57. /*
  58.  * When the library is openned, each object module is read into memory and
  59.  * managed with the following structure.
  60.  */
  61.  
  62. struct liblist_def {
  63.     LD              dir_entry;      /* directory entry for module   */
  64.     char           *object_module;  /* actual text of module        */
  65.     LL             *next;           /* pointer to next in list      */
  66.     SP             *xdef;           /* pointer to xdef list         */
  67.     SP             *xref;           /* pointer to xref list         */
  68. };
  69.